home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_cyn_fall_sound.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  96 lines

  1. # Jones 3D Cog Script
  2. #
  3. # vol_Light-All_sound.cog
  4. #
  5. # This runs the generator sound for the light-alls.
  6. #
  7. # [CM]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14. #...................MESSAGES...................
  15.     message      startup
  16.     message      entered
  17.     message      user0
  18.  
  19. #...................COGS...................
  20.     cog            finalcog
  21.  
  22. #...................THINGS...................
  23.     thing        player                                    local         
  24.     thing        soundobj         
  25.             
  26. #...................VARIABLES...................
  27.     int            soundfx                                    local
  28.     int            running=0                                local
  29.     
  30.     flex        volume=0.3    
  31.     
  32. #...................TRIGGERS...................
  33.     sector        onSECT0                                    linkID=2
  34.     sector        onSECT1                                 linkID=2
  35.     sector        onSECT2                                 linkID=2
  36.     
  37.     sector        offSECT0                                linkID=3
  38.     sector        offSECT1                                linkID=3
  39.  
  40. #...................SOUNDS...................
  41.     sound        fallrun=riv_h20_rapid_a.wav                local
  42.  
  43. end
  44.  
  45. # ========================================================================================
  46.  
  47. code
  48.  
  49. startup:                
  50.     
  51.     player=GetLocalPlayerThing();
  52.     sleep(9.0);
  53.     soundfx=PlaySoundThing(fallrun, soundobj, volume, 3, 60, 0x1);
  54.     running=1;
  55.         
  56. return;
  57.  
  58. # ========================================================================================
  59. entered:
  60.  
  61.     If (GetSenderID() == 2)
  62.     {
  63.         If (GetSourceRef() != player) return;
  64.         If (running == 1) return;
  65.         soundfx=PlaySoundThing(fallrun, soundobj, volume, 3, 60, 0x1);
  66.         running = 1;
  67.     }
  68.  
  69.     
  70.     If (GetSenderID() == 3)
  71.     {
  72.         If (GetSourceRef() != player) return;
  73.         If (running == 0) return;
  74.         StopSound(soundfx, 1.0);
  75.         running = 0;
  76.     }
  77.  
  78. return;
  79.  
  80. # ========================================================================================
  81. user0:
  82.  
  83.     If (GetSenderRef() != finalcog) return;
  84.  
  85.     StopSound(soundfx, 1.0);
  86.  
  87.  
  88. return;
  89.     
  90. # ========================================================================================
  91.  
  92.  
  93. end
  94.  
  95.  
  96.